package com.runfast.waimai.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by WQ on 2018/6/11.
 */
@Mapper
public interface RunfastDataCenterMapper {
    Map<String, Object> newCustomer(@Param("id") Integer agentId, @Param("date0") Date start, @Param("date") Date end, @Param("withQuantity") boolean withQuantity, @Param("withAmount") boolean withAmount);

    Map<String, Object> newCustomerDaily(@Param("id") Integer agentId, @Param("date0") Date start, @Param("date") Date end, @Param("withQuantity") boolean withQuantity, @Param("withAmount") boolean withAmount);

    Map<String, Object> total(@Param("id") Integer agentId, @Param("date0") Date start, @Param("date") Date end, @Param("withQuantity") boolean withQuantity, @Param("withAmount") boolean withAmount, @Param("all") boolean all);

    Integer countBusinessWithOrders(@Param("id") Integer agentId, @Param("date0") Date start, @Param("date") Date end);

    Map<String, Object> overtime(@Param("id") Integer agentId, @Param("date0") Date start, @Param("date") Date end, @Param("withAmount") boolean withAmount);

    Map<String, Object> negativeComment(@Param("id") Integer agentId, @Param("date0") Date start, @Param("date") Date end, @Param("withAmount") boolean withAmount);

    Map<String, Object> cancel(@Param("id") Integer agentId, @Param("date0") Date start, @Param("date") Date end, @Param("withAmount") boolean withAmount);

    List<Map<String, Object>> hourlySum(@Param("id") Integer agentId, @Param("start") Date start, @Param("end") Date end);

    List<Map<String, Object>> countNewCustomer(@Param("start") Date start, @Param("end") Date end);

    List<Map<String, Object>> orderDaily(@Param("id") Integer id, @Param("start") Date start, @Param("end") Date end, @Param("types") List<Integer> types);

    List<Map<String, Object>> getTopList(@Param("id") Integer id, @Param("start") Date startOfYesterday, @Param("end") Date endOfYesterday);

    List<Map<String, Object>> hourlySumIndex(@Param("id") Integer id, @Param("start") Date start, @Param("end") Date end);

    Map<String, Object> index(@Param("id") Integer id, @Param("start") Date start, @Param("end") Date end);

    List<Map<String, Object>> pie1(@Param("id") Integer id, @Param("start") Date start, @Param("end") Date end);

    List<Map<String, Object>> pie2(@Param("id") Integer id, @Param("start") Date start, @Param("end") Date end);

    Integer countNoOrders(@Param("id") Integer id, @Param("start") Date start, @Param("end") Date end);

    Map<String, Object> sumYesterday(@Param("id") Integer id, @Param("start") Date startOfYesterday, @Param("end") Date endOfYesterday);

    List<Map<String, Object>> registerDaily(@Param("start") Date start, @Param("end") Date end);

    Map<String, Object> sumSubsidy(@Param("id") Integer id, @Param("start") Date startOfYesterday, @Param("end") Date endOfYesterday);
}
